﻿#include "FITKAbaConstraintCoupling.h"


namespace Interface {

    FITKAbaAbstractConstraint::FITKAbaConstraintType FITKAbaConstraintCoupling::getConstraintType() const
{
    return FITKAbaAbstractConstraint::FITKAbaConstraintType::Coupling;
}

bool FITKAbaConstraintCoupling::copy(FITKAbstractDataObject *obj)
{
    bool ok = FITKAbaAbstractConstraint::copy(obj);
    if (!ok)
        return false;
    FITKAbaConstraintCoupling *c = dynamic_cast<FITKAbaConstraintCoupling*>(obj);
    if (c == nullptr)
        return false;
    this->m_U1 = c->m_U1;
    this->m_U2 = c->m_U2;
    this->m_U3 = c->m_U3;
    this->m_UR1 = c->m_UR1;
    this->m_UR2 = c->m_UR2;
    this->m_UR3 = c->m_UR3;
    this->m_adjustCentrolPoints = c->m_adjustCentrolPoints;
    this->m_couplingType = c->m_couplingType;
    this->m_csysId = c->m_csysId;
    this->m_influenceRadius = c->m_influenceRadius;
    this->m_influenceRadiusValue = c->m_influenceRadiusValue;
    this->m_weightingMethod = c->m_weightingMethod;
    return true;
}

FITKAbaConstraintCoupling::CouplingType FITKAbaConstraintCoupling::couplingType() const
{
    return m_couplingType;
}

void FITKAbaConstraintCoupling::setCouplingType(CouplingType newCouplingType)
{
    m_couplingType = newCouplingType;
    if (m_couplingType == CouplingType::ContinuumDistributing || m_couplingType == CouplingType::StructualDistributing)
    {
        m_U1 = true;
        m_U2 = true;
        m_U3 = true;
    }
}

bool FITKAbaConstraintCoupling::getU1() const
{
    return m_U1;
}

void FITKAbaConstraintCoupling::setU1(bool newU1)
{
    m_U1 = newU1;
}

bool FITKAbaConstraintCoupling::getU2() const
{
    return m_U2;
}

void FITKAbaConstraintCoupling::setU2(bool newU2)
{
    m_U2 = newU2;
}

bool FITKAbaConstraintCoupling::getU3() const
{
    return m_U3;
}

void FITKAbaConstraintCoupling::setU3(bool newU3)
{
    m_U3 = newU3;
}

bool FITKAbaConstraintCoupling::getUR1() const
{
    return m_UR1;
}

void FITKAbaConstraintCoupling::setUR1(bool newUR1)
{
    m_UR1 = newUR1;
}

bool FITKAbaConstraintCoupling::getUR2() const
{
    return m_UR2;
}

void FITKAbaConstraintCoupling::setUR2(bool newUR2)
{
    m_UR2 = newUR2;
}

bool FITKAbaConstraintCoupling::getUR3() const
{
    return m_UR3;
}

void FITKAbaConstraintCoupling::setUR3(bool newUR3)
{
    m_UR3 = newUR3;
}

FITKAbaConstraintCoupling::WeightingMethod FITKAbaConstraintCoupling::getWeightingMethod() const
{
    return m_weightingMethod;
}

void FITKAbaConstraintCoupling::setWeightingMethod(WeightingMethod newWeightingMethod)
{
    m_weightingMethod = newWeightingMethod;
}

FITKAbaConstraintCoupling::InfluenceRadius FITKAbaConstraintCoupling::getInfluenceRadius() const
{
    return m_influenceRadius;
}

void FITKAbaConstraintCoupling::setInfluenceRadius(InfluenceRadius newInfluenceRadius)
{
    m_influenceRadius = newInfluenceRadius;
}

double FITKAbaConstraintCoupling::getInfluenceRadiusValue() const
{
    return m_influenceRadiusValue;
}

void FITKAbaConstraintCoupling::setInfluenceRadiusValue(double newInfluenceRadiusValue)
{
    m_influenceRadiusValue = newInfluenceRadiusValue;
}

bool FITKAbaConstraintCoupling::getAdjustCentrolPoints() const
{
    return m_adjustCentrolPoints;
}

void FITKAbaConstraintCoupling::setAdjustCentrolPoints(bool newAdjustCentrolPoints)
{
    m_adjustCentrolPoints = newAdjustCentrolPoints;
}

int FITKAbaConstraintCoupling::getCsysId() const
{
    return m_csysId;
}

void FITKAbaConstraintCoupling::setCsysId(int newCsysId)
{
    m_csysId = newCsysId;
}

}
